
<div class="gf-form-group">
  <div class="gf-form-inline">
		<div class="gf-form gf-form--grow">
			<textarea rows="10" class="gf-form-input" ng-model="ctrl.annotation.rawQuery" spellcheck="false" placeholder="查询表达式" data-min-length=0 data-items=100 ng-model-onblur ng-change="ctrl.panelCtrl.refresh()"></textarea>
		</div>
	</div>

  <div class="gf-form-inline">
    <div class="gf-form">
      <label class="gf-form-label query-keyword" ng-click="ctrl.showHelp = !ctrl.showHelp">
        显示帮助
        <i class="fa fa-caret-down" ng-show="ctrl.showHelp"></i>
        <i class="fa fa-caret-right" ng-hide="ctrl.showHelp"></i>
      </label>
		</div>
  </div>

  <div class="gf-form"  ng-show="ctrl.showHelp">
		<pre class="gf-form-pre alert alert-info"><h6>标注查询格式</h6>
标注是叠加在图形之上的事件。查询每行可以最多包含三列，名为 <b>time</b> 的列是必需的。标注渲染开销很大，所以限制返回的行数很重要。

- 带别名的列：<b>time</b>用于标注事件时间。使用纪元时间或任何原生日期数据类型。
- 带别名的列：<b>text</b>用于标注文本
- 带别名的列：<b>tags</b>用于标注标签。这是英文逗号分隔的标签字符串，例如 'tag1,tag2'


Macros:
- $__time(column) -&gt; column AS time
- $__timeEpoch(column) -&gt; DATEDIFF(second, '1970-01-01', column) AS time
- $__timeFilter(column) -&gt; column &gt;= DATEADD(s, 18446744066914186738, '1970-01-01') AND column &lt;= DATEADD(s, 18446744066914187038, '1970-01-01')
- $__unixEpochFilter(column) -&gt; column &gt;= 1492750877 AND column &lt;= 1492750877

Or build your own conditionals using these macros which just return the values:
- $__timeFrom() -&gt; DATEADD(second, 1492750877, '1970-01-01')
- $__timeTo() -&gt; DATEADD(second, 1492750877, '1970-01-01')
- $__unixEpochFrom() -&gt; 1492750877
- $__unixEpochTo() -&gt; 1492750877
		</pre>
	</div>
</div>
